<!-- 
 * 个人中心
 * ============================================================================
 * 版权所有 2015-2017 风影随行，并保留所有权利。
 * 网站地址: http://www.haoshu888.com
 * ----------------------------------------------------------------------------
 * 这不是一个自由软件！不允许对程序代码以任何形式任何目的的再发布，作者将保留
 * 追究法律责任的权力和最终解释权。
-->
{template '_headerv2'}
<link href="{MODULE_URL}template/mobile/style/cssv2/new_self.css?v={$versions}" rel="stylesheet" />

<div class="global-content-c">
	<div class="my-main fadeIn animated">
		<div class="my-head" {if !empty($config['ucenter_bg'])}style="background-image:url({$_W['attachurl']}{$config['ucenter_bg']});"{/if}>
			<div class="my-head-c">
				{if $setting['self_setting']}
				<div class="setting" onclick="location.href='{php echo url('mc/profile')}'">
					<i class="fa fa-cog fa-spin fa-lg"></i>
				</div>
				{/if}
				<div>
					<span id="my-set-avatar" class="my-head-c-avatar img-bgloading">
						<i><img class="qmavatar" src="{$avatar}" ></i>
					</span>
					<span>
						<strong class="nickname">{php echo $memberinfo['nickname'] ? $memberinfo['nickname'] : '未设置';}</strong>
						<span class="studentno">学号:{$studentno}</span>
					</span>
				</div>
			</div>
			<div class="water">
				<div class="water-1"></div>
				<div class="water-2"></div>
			</div>
			<a class="my-head-vip slideInRight" href="{php echo $this->createMobileUrl('vip');}"></a>
		</div>
		<div class="my-message-scroll">
			<div class="my-data">
				<ul class="weui-flex">
					<li class="wallet weui-flex__item bottom-line" onclick="location.href='{php echo url('mc/bond/credits', array('credittype' => 'credit2', 'type' => 'record', 'period' => '1'))}'">
						<strong class="c-main">￥{$memberinfo['credit2']}</strong>
						<span>会员余额</span>
					</li>
					<li class="credit weui-flex__item bottom-line" onclick="location.href='{php echo url('mc/bond/credits', array('credittype' => 'credit1', 'type' => 'record', 'period' => '1'))}'">
						<strong>{$memberinfo['credit1']}</strong>
						<span>会员积分</span>
					</li>
				</ul>
			</div>
			<div class="my-apps clear">
				<a class="my-apps-a" href="{php echo $this->createMobileUrl('vip');}">
					<div class="my-apps-c clear">
						<span class="z"><i class="fa fa-orange fa-diamond"></i> VIP服务 <i class="fa fa-angle-right"></i></span>
					</div>
				</a>
				<a class="my-apps-a" href="{php echo $this->createMobileUrl('history');}">
					<div class="my-apps-c clear">
						<span class="z"><i class="fa fa-blue fa-hourglass-half"></i> 我的足迹 <i class="fa fa-angle-right"></i></span>
					</div>
				</a>
				<a class="my-apps-a" href="{php echo $this->createMobileUrl('collect', array('ctype'=>1));}">
					<div class="my-apps-c clear">
						<span class="z"><i class="fa fa-red fa-heart"></i> 收藏课程 <i class="fa fa-angle-right"></i></span>
					</div>
				</a>
				<a class="my-apps-a" href="{php echo $this->createMobileUrl('collect', array('ctype'=>2));}">
					<div class="my-apps-c clear">
						<span class="z"><i class="fa fa-red fa-gratipay"></i> 收藏讲师 <i class="fa fa-angle-right"></i></span>
					</div>
				</a>
				{if $setting['teacher_income']>0 || !empty($teacher)}
				<a class="my-apps-a" href="{php echo $this->createMobileUrl('teachercenter');}">
					<div class="my-apps-c clear">
						<span class="z"><i class="fa fa-orange fa-free-code-camp"></i> 讲师中心 <i class="fa fa-angle-right"></i></span>
					</div>
				</a>
				{/if}
				{if $comsetting['is_sale']==1}
		  			{if ($comsetting['sale_rank']==1) || ($comsetting['sale_rank']==2 && !empty($memberVip))}
		  			<a class="my-apps-a" href="{php echo $this->createMobileUrl('commission');}">
						<div class="my-apps-c clear">
							<span class="z"><i class="fa red-color fa-share-alt"></i> {php echo $config['share_name']?$config['share_name']:'分销中心';} <i class="fa fa-angle-right"></i></span>
						</div>
					</a>
		  			{/if}
		  		{/if}
				<a class="my-apps-a" href="{php echo $this->createMobileUrl('coupon');}">
					<div class="my-apps-c clear">
						<span class="z"><i class="fa fa-pink fa-money"></i>&nbsp;优惠券&nbsp;&nbsp;&nbsp;&nbsp;<i class="fa fa-angle-right"></i></span>
					</div>
				</a>
				{if $setting['modify_mobile']}
				<a class="my-apps-a" href="{php echo $this->createMobileUrl('writemsg', array('op'=>'modifyMobile'));}">
					<div class="my-apps-c clear">
						<span class="z"><i class="fa fa-pink fa-mobile-phone"></i> {php echo $memberinfo['mobile'] ? '修改':'绑定';}手机 <i class="fa fa-angle-right"></i></span>
					</div>
				</a>
				{/if}

				{if !empty($self_diy)}
					{loop $self_diy $item}
					<a class="my-apps-a" href="{$item['diy_link']}">
						<div class="my-apps-c clear">
							<span class="z"><i class="fa fa-blue fa-{php echo $item['diy_image'] ? $item['diy_image'] : 'link';}"></i> {$item['diy_name']} <i class="fa fa-angle-right"></i></span>
						</div>
					</a>
					{/loop}
				{/if}
			</div>
			{if !$userAgent}
			<div class="logout">
				<a href="{php echo url('mc/home/login_out');}">退出登录</a>
			</div>
			{/if}
		</div>
	</div>
</div>
<script type="text/javascript">
$("#my-set-avatar").click(function(){
	var agent = <?php echo $agent; ?>;
	if(!agent){
		return;
	}
	if(!confirm('更新头像信息?')){
		return;
	}
	location.href = "{php echo $this->createMobileUrl('self', array('updateInfo'=>1));}";
});
</script>
{template '_footerv2'}